Skip to content

chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling - #644

Open
mfw78 wants to merge 2 commits into
mainfrom
chore/claude-dev-tooling
Open

chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling#644
mfw78 wants to merge 2 commits into
mainfrom
chore/claude-dev-tooling

Conversation

@mfw78

@mfw78 mfw78 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Adds the shared agent tooling this repo lacked after the carve: the Claude Code hooks, an AGENTS.md contract, and two supporting dev-shell and test-runner changes. No source, justfile, or CI change.

.claude/hooks/ carries three hooks copied from the sibling repo where they are already in use. rustfmt-on-edit.sh formats each edited .rs file at edition 2024, which matches this workspace. content-lint.sh blocks an edit that adds an em-dash to a .rs or .md file. nextest-on-stop.sh runs nextest for the crates with uncommitted .rs changes at the end of a turn. Each hook exits cleanly when its tool is missing, so nothing runs outside the nix develop shell. .claude/settings.json wires them to the PostToolUse and Stop events.

AGENTS.md (83 lines) states what shepherd is, the crate and engine*.toml layout, the extensions.toml capability registry, the pinned nexum-runtime and videre-nexum-module revs and the rule that a bump moves the crate manifests, wit/deps.toml, and wit/deps/ together, the build and test commands, and the house rules. Every claim is grounded in the README, Cargo.toml, the crate manifests, extensions.toml, the justfile, and the CI workflows. CLAUDE.md is a symlink to it, committed with mode 120000.

flake.nix gains ripgrep and ast-grep in the devShell package list; cargo-nextest was already present and nothing was removed. .config/nextest.toml is new and sets a 60s slow-timeout that terminates a hung test after 5 periods. The justfile and CI already run cargo nextest run plus a separate cargo test --doc, so they are untouched.

.gitignore previously ignored all of .claude/. It now tracks settings.json and hooks/ and keeps settings.local.json and worktrees/ ignored.

Validation: jq -e parses settings.json, tomllib parses .config/nextest.toml, nix-instantiate --parse parses flake.nix, bash -n parses each hook, content-lint.sh blocks an em-dash fixture and passes a clean one, and rg -F finds no em-dash in AGENTS.md.

Closes #643

AI Assistance: Claude Opus used for the recon, the hooks, AGENTS.md, and the flake change.

mfw78 added 2 commits July 29, 2026 06:42
…oling

Add the shared agent tooling this repo lacked after the carve.

.claude/hooks/ carries three tested hooks: rustfmt-on-edit.sh formats each
edited .rs file at edition 2024 (the workspace edition), content-lint.sh blocks
an edit that adds an em-dash to a .rs or .md file, and nextest-on-stop.sh runs
nextest for the crates with uncommitted .rs changes at the end of a turn. Each
hook is a no-op when its tool is absent, so nothing runs outside the dev shell.
.claude/settings.json wires them to the PostToolUse and Stop events.

AGENTS.md states the repo contract: what shepherd is, the crate and config
layout, the nexum-runtime and videre-nexum-module rev pins, the build and test
commands, and the house rules. CLAUDE.md is a symlink to it. The file follows
ASD-STE100 Simplified Technical English with one sentence per line.

flake.nix gains ripgrep and ast-grep in the devShell; cargo-nextest was already
there. .config/nextest.toml adds a 60s slow-timeout that terminates a hung test
after 5 periods. The justfile and CI are unchanged: they already run
cargo nextest run plus a separate cargo test --doc.

.gitignore previously ignored all of .claude/. It now tracks settings.json and
hooks/ and keeps settings.local.json and worktrees/ ignored.

AI Assistance: Claude Opus used for the hooks, AGENTS.md, and flake change
content-lint scanned the whole file, so any edit to a file that already carried
an em-dash was blocked even when the edit added none. That made an existing
README or comment effectively uneditable.

Compare the count against the committed version of the same file and block only
on a net increase. A file that already carries the token stays editable, and
adding one is still blocked.

AI Assistance: Claude Opus used for this fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Claude Code hooks and an AGENTS.md contract

1 participant